package mamikeji.liaowa.utils;

import android.widget.Toast;

import mamikeji.liaowa.application.MyApplication;


/**
 * @author linmu
 * 封装的toast
 */
public class ForToast
{
    private static Toast toast;
    /**
     * String 文件
     */
    public static void showToast(int resid) {
        if (toast == null) {
            toast = Toast.makeText(MyApplication.getContext(), resid, Toast.LENGTH_SHORT);
        }
        toast.setText(resid);
        toast.show();
    }

    /**
     * 直接提示
     */
    public static void showToast(String text) {
        if (toast == null) {
            toast = Toast.makeText(MyApplication.getContext(), text, Toast.LENGTH_SHORT);
        }
        toast.setText(text);
        toast.show();
    }

}
